package com.songxh.facade.controller;

import com.songxh.application.api.LikeService;
import com.songxh.application.dto.like.ArticleLikeDTO;
import com.songxh.core.base.CommonResult;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 点赞相关的接口
 * @author songxh
 * @create 2023-01-29-10:51
 */
@RestController
@RequestMapping("/gra/songxh/blog/like")
public class LikeController {

    @Autowired
    private LikeService likeService;

    @PostMapping("/article/like")
    public CommonResult likeOrCancelLikeArticle(@RequestBody ArticleLikeDTO articleLikeDTO){
        return likeService.likeOrCancelLikeArticle(articleLikeDTO);
    }
}
